<?php
    require_once dirname(__FILE__) . '/../../utils/Utils.php';
    //引入公共参数
    $constant = include(dirname(__FILE__) . '/../../AppletConstant.php');

	$utils =	new Utils();
	/**
	 * 申请解约
	 *
	 */

	//调用接口地址
	$url = "https://open.95516.com/open/access/1.0/contract.relieve";

	//拼装参数Map
	$params 	=	array();
    $params["appId"] 			=	$constant['appId'];
    $params["openId"] 			=	$constant['openId'];
    $params["backendToken"] 	=	$constant['backendToken'];

    //申请签约完成后返回委托免密支付协议 id
    $params["contractId"] 		=	"";

	//协议模板 id ，由云闪付录入模板并分配给接入方
	$params["planId"] 			=	"";

	//接入方请求签约时传入的签约协议号，由接入方生产且须唯一
	$params["contractCode"] 	=	"";

	//发送请求
	$resultStr 	=	$utils->sendPostGson($url,$params);

	header("Content-type: text/html; charset=utf-8");
	print_r("-------申请解约: ".$resultStr." --------- ");
	exit;
?>